const { Sequelize } = require('sequelize');

// 链接数据库
const instance = new Sequelize('zyy', 'root', 'root', {
    host: 'localhost',
    dialect: 'mysql',
    freezeTableName: true
})
async function testConnection() {
    try {
        await instance.authenticate();
    } catch (e) {
        console.log(e)
    }
    instance.close()
}
// testConnection()
module.exports = instance
